package com.yzy.controller;



import com.google.common.collect.Lists;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.Set;

/**
 * @author yangzhenyu
 * @version 1.0
 * @description:
 * @date 2022/6/28 13:52
 */
public class Test3 {
    public static void main(String[] args) {
        //list 转 set
        ArrayList<String> list =  Lists.newArrayList();
        list.add("1");
        list.add("1");
        list.add("1");
        list.add("2");
        list.add("2");
        Set<String> set = new HashSet<>(list);
        System.out.println(set);
    }
}
